from flask import Flask, render_template, request

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('login.html')


@app.route('/login', methods=['GET', 'POST'])
def login():
    username = request.form.get('myname')
    userpwd = request.form.get('mypwd')
    if username == '111' and userpwd == '123':
        return "登入成功"
    else:
        return render_template('login.html')


#/@app.route('/zc', methods=['GET', 'POST'])
#def zc(user=None):
    #username = request.form.get('myname')
   # userpwd = request.form.get('mypwd')
    #user[username] = userpwd
  #  return render_template('zc.html')


if __name__ == '__main__':
    app.run(debug=True)
